Last updated: 2022-07-19

Checks: 6 1

Knit directory: mapme.protectedareas/

This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


The R Markdown file has staged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20210305) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 6050648. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .RData
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/

Untracked files:
    Untracked:  analysis/table_cells_overlapping_wdpa.Rmd

Staged changes:
    Modified:   analysis/map_cells_overlapping_wdpa.Rmd

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/map_cells_overlapping_wdpa.Rmd) and HTML (docs/map_cells_overlapping_wdpa.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd 6050648 Yota Eilers 2022-07-19 add table with number of obs
html 6050648 Yota Eilers 2022-07-19 add table with number of obs
Rmd cae0dea Yota Eilers 2022-06-23 New map to check cells with multiple PAs
html cae0dea Yota Eilers 2022-06-23 New map to check cells with multiple PAs

Problem Description

Reasons for this can be:

  • Cells at the border of multiple PAs
  • Cells within overlapping PAs

Only cells that cause issues in our analysis, i.e. cells for which assigned PAs have had a project starting in the same year.

Example for illustration: Say, we have the following cells:

  • Cell “12345” with corresponding PAs with WDPA IDs “1” and “2”, and
  • Cell “23456” with corresponding PAs with WDPA IDs “3” and “4”.

Now, say PAs “1” and “2” both have a project starting in the same year; PAs “3” and “4” have projects starting in different years. In that case, cell “12345” is shown in the map below, cell “23456” is not. Reason: The correct (for our analysis) WDPA ID can be identified for cell “23456” by filtering by project start year. For cell “12345”, this is not possible.

Table

This table shows the number of treatment cells with multiple assigned PAs (WDPA IDs) for each matching frame (year).

Matching frame (Year) Cells with multiple WDPA IDs Total number of treated cells
2005 11 938
2006 250 11863
2007 155 22846
2008 161 9866
2009 152 1407
2010 23 1793
2011 34 3170
2012 50 11678
2013 3 507
2015 2606 124863
2016 870 2575
2019 7 1816

The following plot displays the number of observations vs. the number of WDPA IDs assigned to a cell. This plot does not show cells that have only one assigned WDPA ID. Most cells that have multiple WDPA IDs have only two corresponding WDPA IDs.

Map

This map shows treatment cells that have multiple assigned PAs (WDPA IDs).


R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
 [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
 [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
[10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] plotly_4.9.3          kableExtra_1.3.4      stars_0.5-3          
 [4] abind_1.4-5           rgdal_1.5-28          raster_3.5-12        
 [7] sp_1.4-6              RColorBrewer_1.1-3    htmltools_0.5.2      
[10] scales_1.2.0          ggsci_2.9             leaflet.extras2_1.1.0
[13] leaflet.extras_1.0.0  leaflet_2.0.4.1       sf_1.0-7             
[16] forcats_0.5.1         stringr_1.4.0         dplyr_1.0.9          
[19] purrr_0.3.4           readr_2.1.2           tidyr_1.2.0          
[22] tibble_3.1.7          ggplot2_3.3.6         tidyverse_1.3.1      

loaded via a namespace (and not attached):
 [1] colorspace_2.0-3        ellipsis_0.3.2          class_7.3-20           
 [4] rprojroot_2.0.3         fs_1.5.2                rstudioapi_0.13        
 [7] proxy_0.4-27            farver_2.1.1            bit64_4.0.5            
[10] fansi_1.0.3             lubridate_1.8.0         xml2_1.3.3             
[13] codetools_0.2-18        knitr_1.39              jsonlite_1.8.0         
[16] workflowr_1.7.0         broom_1.0.0             dbplyr_2.2.1           
[19] compiler_3.6.3          httr_1.4.3              backports_1.4.1        
[22] assertthat_0.2.1        fastmap_1.1.0           lazyeval_0.2.2         
[25] cli_3.3.0               later_1.3.0             leaflet.providers_1.9.0
[28] tools_3.6.3             gtable_0.3.0            glue_1.6.2             
[31] Rcpp_1.0.9              cellranger_1.1.0        jquerylib_0.1.4        
[34] vctrs_0.4.1             svglite_2.0.0           crosstalk_1.2.0        
[37] lwgeom_0.2-8            xfun_0.31               rvest_1.0.2            
[40] lifecycle_1.0.1         terra_1.5-34            vroom_1.5.7            
[43] hms_1.1.1               promises_1.2.0.1        parallel_3.6.3         
[46] yaml_2.3.5              sass_0.4.1              stringi_1.7.8          
[49] highr_0.9               e1071_1.7-11            rlang_1.0.3            
[52] pkgconfig_2.0.3         systemfonts_1.0.2       evaluate_0.15          
[55] lattice_0.20-45         htmlwidgets_1.5.4       labeling_0.4.2         
[58] bit_4.0.4               tidyselect_1.1.2        magrittr_2.0.3         
[61] R6_2.5.1                generics_0.1.3          DBI_1.1.3              
[64] pillar_1.7.0            haven_2.5.0             whisker_0.4            
[67] withr_2.5.0             units_0.8-0             modelr_0.1.8           
[70] crayon_1.5.1            KernSmooth_2.23-20      utf8_1.2.2             
[73] tzdb_0.3.0              rmarkdown_2.14          grid_3.6.3             
[76] readxl_1.4.0            data.table_1.14.2       git2r_0.28.0           
[79] reprex_2.0.1            digest_0.6.29           classInt_0.4-7         
[82] webshot_0.5.2           httpuv_1.6.1            munsell_0.5.0          
[85] viridisLite_0.4.0       bslib_0.3.1